#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int is_prime(int n)
{
	for (int i = 2; i <= sqrt(n); i++)
		if (n % i == 0)
			return 0;
	
	return 1;
}

int main()
{
	int m, count = 0;
	scanf("%d", &m);

	for (int i = m - 1; count < 10; i--)
	{
		if (is_prime(i))
		{
			printf("%d ", i);
			count++;
		}
	}
	return 0;
}